package pt.iscte.pidesco.filebrowser.model;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class PackageElement extends SourceElement {
	private ArrayList<SourceElement> children;
	
	public PackageElement(PackageElement parent, String name) {
		super(parent, name);
		children = new ArrayList<SourceElement>();
	}

	void addChild(SourceElement child) {
		children.add(child);
//		child.setParent(this);
	}

//	void removeChild(SourceElement child) {
//		children.remove(child);
//		child.setParent(null);
//	}

	public List<SourceElement> getChildren() {
		return Collections.unmodifiableList(children);
	}

	public boolean hasChildren() {
		return children.size() > 0;
	}
}